/**
 * futures : masterlink.futures.vo.GreekLimit.java
 */
package masterlink.futures.vo;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 * TODO Write the description
 *
 * @author : tonyyang
 * Create date : 2011/11/9
 * @version 1.0.0	
 */
@Entity
@Table(name="greeks_Limit_group")
public class GreekLimit implements Serializable{

	private static final long serialVersionUID = -8187199856064580732L;
	@Id
	@GeneratedValue(strategy=GenerationType.AUTO, generator="limit_id") 
    @SequenceGenerator(name="limit_id", sequenceName = "SEQ_LIMIT_ID")
	@Column(name="UNIQUEID")
	private Long uniqueid;
	@Column(name="ID")
	private Long id;
	@Column(name="BROKER")
	private String broker;
	@Column(name="ACCOUNT")
	private String account;
	@Column(name="LIMIT_UP_MRKT")
	private Long limitUpMrkt=0l;
	@Column(name="LIMIT_DN_MRKT")
	private Long limitDnMrkt=0l;
	@Column(name="LIMIT_UP_BALANCE")
	private Long limitUpBalance=0l;
	@Column(name="LIMIT_DN_BALANCE")
	private Long limitDnBalance=0l;
	@Column(name="LIMIT_UP_REF")
	private Long limitUpRef=0l;
	@Column(name="LIMIT_DN_REF")
	private Long limitDnRef=0l;
	@Column(name="LIMIT_UP_DELTA")
	private Long limitUpDelta=0l;
	@Column(name="LIMIT_DN_DELTA")
	private Long limitDnDelta=0l;
	@Column(name="STATUS")
	private Integer status=0;
	
	public Long getUniqueid() {
		return uniqueid;
	}
	public void setUniqueid(Long uniqueid) {
		this.uniqueid = uniqueid;
	}
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public String getBroker() {
		return broker;
	}
	public void setBroker(String broker) {
		this.broker = broker;
	}
	public String getAccount() {
		return account;
	}
	public void setAccount(String account) {
		this.account = account;
	}
	public Long getLimitUpMrkt() {
		return limitUpMrkt;
	}
	public void setLimitUpMrkt(Long limitUpMrkt) {
		this.limitUpMrkt = limitUpMrkt;
	}
	public Long getLimitDnMrkt() {
		return limitDnMrkt;
	}
	public void setLimitDnMrkt(Long limitDnMrkt) {
		this.limitDnMrkt = limitDnMrkt;
	}
	public Long getLimitUpBalance() {
		return limitUpBalance;
	}
	public void setLimitUpBalance(Long limitUpBalance) {
		this.limitUpBalance = limitUpBalance;
	}
	public Long getLimitDnBalance() {
		return limitDnBalance;
	}
	public void setLimitDnBalance(Long limitDnBalance) {
		this.limitDnBalance = limitDnBalance;
	}
	public Long getLimitUpRef() {
		return limitUpRef;
	}
	public void setLimitUpRef(Long limitUpRef) {
		this.limitUpRef = limitUpRef;
	}
	public Long getLimitDnRef() {
		return limitDnRef;
	}
	public void setLimitDnRef(Long limitDnRef) {
		this.limitDnRef = limitDnRef;
	}
	public Long getLimitUpDelta() {
		return limitUpDelta;
	}
	public void setLimitUpDelta(Long limitUpDelta) {
		this.limitUpDelta = limitUpDelta;
	}
	public Long getLimitDnDelta() {
		return limitDnDelta;
	}
	public void setLimitDnDelta(Long limitDnDelta) {
		this.limitDnDelta = limitDnDelta;
	}
	public Integer getStatus() {
		return status;
	}
	public void setStatus(Integer status) {
		this.status = status;
	}
	/* (non-Javadoc)
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		StringBuilder builder = new StringBuilder();
		builder.append("GreekLimit [uniqueid=");
		builder.append(uniqueid);
		builder.append(", id=");
		builder.append(id);
		builder.append(", broker=");
		builder.append(broker);
		builder.append(", account=");
		builder.append(account);
		builder.append(", limitUpMrkt=");
		builder.append(limitUpMrkt);
		builder.append(", limitDnMrkt=");
		builder.append(limitDnMrkt);
		builder.append(", limitUpBalance=");
		builder.append(limitUpBalance);
		builder.append(", limitDnBalance=");
		builder.append(limitDnBalance);
		builder.append(", limitUpRef=");
		builder.append(limitUpRef);
		builder.append(", limitDnRef=");
		builder.append(limitDnRef);
		builder.append(", limitUpDelta=");
		builder.append(limitUpDelta);
		builder.append(", limitDnDelta=");
		builder.append(limitDnDelta);
		builder.append(", status=");
		builder.append(status);
		builder.append("]");
		return builder.toString();
	}
	/* (non-Javadoc)
	 * @see java.lang.Object#hashCode()
	 */
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((uniqueid == null) ? 0 : uniqueid.hashCode());
		return result;
	}
	/* (non-Javadoc)
	 * @see java.lang.Object#equals(java.lang.Object)
	 */
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (!(obj instanceof GreekLimit))
			return false;
		GreekLimit other = (GreekLimit) obj;
		if (uniqueid == null) {
			if (other.uniqueid != null)
				return false;
		} else if (!uniqueid.equals(other.uniqueid))
			return false;
		return true;
	}
	
}
